﻿<Window x:Class="SGGWElevator.ElevatorsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        xmlns:c="clr-namespace:SGGWElevator"
        Title="SGGWElevator" Height="700" Width="1000" Background="#1c1c1c" ResizeMode="NoResize">
    <Window.Resources>

        <!--Brushes-->
        <SolidColorBrush x:Key="WindowBackgroundColor" Color="#1c1c1c"/>
        <SolidColorBrush x:Key="MainSectionBackgroundColor" Color="#212121"/>

        <SolidColorBrush x:Key="FloorSectionBackgroundColor1" Color="#2b2b2d"/>
        <SolidColorBrush x:Key="FloorSectionBackgroundColor2" Color="#2f2f32"/>
        

        <!--Constants-->
        <System:Double x:Key="FloorHeight">85</System:Double>
        <System:Double x:Key="FloorLabelsGridWidth">200</System:Double>

    </Window.Resources>
    
    <!--Window-->
    <Canvas>
        
        <!--Main section-->
        <Canvas Width="950" Height="650" Background="{StaticResource MainSectionBackgroundColor}" Margin="25 10">
            
            <!--Floors panel-->
            <Canvas x:Name="FloorsPanel" Visibility="Visible" Height="425" Width="950" Canvas.Top="70">
                <!--Floor sections-->
                <Rectangle Canvas.Top="0" Width="950" Height="{StaticResource FloorHeight}" Fill="{StaticResource FloorSectionBackgroundColor1}"/>
                <Rectangle Canvas.Top="85" Width="950" Height="{StaticResource FloorHeight}" Fill="{StaticResource FloorSectionBackgroundColor2}"/>
                <Rectangle Canvas.Top="170" Width="950" Height="{StaticResource FloorHeight}" Fill="{StaticResource FloorSectionBackgroundColor1}"/>
                <Rectangle Canvas.Top="255" Width="950" Height="{StaticResource FloorHeight}" Fill="{StaticResource FloorSectionBackgroundColor2}"/>
                <Rectangle Canvas.Top="340" Width="950" Height="{StaticResource FloorHeight}" Fill="{StaticResource FloorSectionBackgroundColor1}"/>


                <!--Separators-->
                <Rectangle Canvas.Left="200" Width="5" Height="{Binding ElementName=FloorsPanel, Path=Height}" Fill="{StaticResource MainSectionBackgroundColor}"/>
                <Rectangle Canvas.Left="450" Width="5" Height="{Binding ElementName=FloorsPanel, Path=Height}" Fill="{StaticResource MainSectionBackgroundColor}"/>
                <Rectangle Canvas.Left="700" Width="5" Height="{Binding ElementName=FloorsPanel, Path=Height}" Fill="{StaticResource MainSectionBackgroundColor}"/>


                <!--Floor numbers-->
                <Grid Width="{StaticResource FloorLabelsGridWidth}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.Resources>
                        <Style x:Name="FloorLabelStyle" TargetType="{x:Type Label}">
                            <Setter Property="FontFamily" Value="Fonts/#Segoe WP"/>
                            <Setter Property="FontSize" Value="40"/>
                            <Setter Property="HorizontalContentAlignment" Value="Center"/>
                            <Setter Property="Height" Value="85"/>
                            <Setter Property="VerticalContentAlignment" Value="Center"/>
                            <Setter Property="Foreground" Value="#5c5b5b"/>
                        </Style>
                    </Grid.Resources>
                    <Label Content="3" Grid.Row="0"/>
                    <Label Content="2" Grid.Row="1"/>
                    <Label Content="1" Grid.Row="2"/>
                    <Label Content="0" Grid.Row="3"/>
                    <Label Content="-1" Grid.Row="4"/>
                </Grid>
            </Canvas>
            
            <!--Elevators-->
            <c:ElevatorControl x:Name="PersonElevator1" Canvas.Left="200" Canvas.Top="8"/>
            <c:ElevatorControl x:Name="PersonElevator2" Canvas.Left="450" Canvas.Top="8"/>
            <c:ElevatorControl x:Name="BaggageElevator1" Canvas.Left="700" Canvas.Top="8"/>
        </Canvas>
    </Canvas>
</Window>
